<%@ page import="com.luzhikun.jsptest.myjsp.Students" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Iterator" %><%--
  Created by IntelliJ IDEA.
  User: 小柒的Java
  Date: 2021/4/27
  Time: 9:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>JSP练习题</title>
</head>
<body>

练习一：在JSP页面中输出九九乘法表<br>
<%
    for (int i = 1; i <= 9; i++) {
        for (int j = 1; j <= i; j++) {

%>
<%=i + "*" + j + "=" + i * j%>
<%
    }
%>
<%--<%=<>%>--%>
<br>
<%
    }
%>
<br>
练习二：jsp输出一个表格，里边有10个学生信息<br>
<%
    List<Students> list = new ArrayList<>();
    list.add(new Students(1, "吴杰", 13, "女"));
    list.add(new Students(1, "吴杰", 13, "女"));
    list.add(new Students(1, "吴杰", 13, "女"));
    list.add(new Students(1, "吴杰", 13, "女"));
    list.add(new Students(1, "吴杰", 13, "女"));
    list.add(new Students(1, "吴杰", 13, "女"));
    list.add(new Students(1, "吴杰", 13, "女"));

    Iterator iterator = list.iterator();
    while (iterator.hasNext()) {
        Object next = iterator.next();
%>
<%=next.toString() + "<br >"%>
<%
    }
%>

</body>
</html>
